package com.example.entity;

import com.example.entity.parent.Parent;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@Data
@Entity
@Table(name = "user")
@ApiModel
public class User extends Parent {

    @Column(name = "level", length = 2)
    @ApiModelProperty("用户等级")
    private int level;

    @Column(name = "days", length = 10)
    @ApiModelProperty("签到天数")
    private int days;

    @Column(name = "last_time")
    @ApiModelProperty("上一次签到时间")
    private Date lastTime;

    @Transient
    @ApiModelProperty("是否已签到")
    private boolean isSignIn;

    @Column(name = "sum", length = 10)
    @ApiModelProperty("学习句子总次数")
    private int sum;

}
